<template>
  <div>
    <h2 @click="fullName='hey-bro'">{{ fullName }}</h2>
  </div>
</template>

<script setup lang="ts">
import { computed, ref } from "vue"
const firstName = ref('cai')
const lastName = ref('xukun')
const fullName = computed({
  get(){
    return firstName.value +'🐓'+ lastName.value
  },
  set(value:string){
    alert(value)
    const arr=value.split('-')
    firstName.value=arr[0]
    lastName.value=arr[1]
  }

})
</script>

<style>

</style>